var _w;
var _H;
var realWidth;
var realHeight; 
window.onload=function(){
	_w = parseInt($(window).width()); //获取浏览器的宽度
	_H = parseInt($(window).height()); //获取浏览器的高度
	$("<img/>").attr("src", "image/24958388_p0_master1200.jpg").load(function() {
		realWidth = this.width;
		realHeight = this.height;
		$(".background").css("width", _w).css("height", _H);
	});
}

$(window).resize(function(){
	_w = parseInt($(window).width()); //获取浏览器的宽度
	_H = parseInt($(window).height()); //获取浏览器的高度
	$(".background").css("width", _w).css("height", _H);
});

$(document).ready(function(){
	// 折叠面板功能
	var accordion = $("#stepForm").accordion();
	var current = 0;

	// 返回按钮不需要运行验证
	$("#registPage1 .prevbutton").click(function(){
		accordion.accordion("option", "active", 0);
		current = 0;
	});
	$("#registPage2  .prevbutton").click(function(){
		accordion.accordion("option", "active", 1);
		current = 1;
	});
	// 所有通过上面指定的目标重载的按钮都要运行验证
	$(".open2").click(function() {
	    accordion.accordion("option", "active", 2);
	    current = 2;
	});
	$("li .right").click(function() {
	    accordion.accordion("option", "active", 1);
	    current = 1;
	});
	$(".open0").click(function() {
	    accordion.accordion("option", "active", 0);
	    current = 0;
	});
	
	$(".otherLogin a").hover(function(){
		$(this).css("backgroundPosition","center bottom"); 
	});
	$(".otherLogin a").mouseleave(function(){
		$(this).css("backgroundPosition","center top"); 
	});

});

$('.form_date').datetimepicker({
        language:  'zh-CN',
        weekStart: 1,
        todayBtn:  1,
		autoclose: 1,
		todayHighlight: 1,
		startView: 2,
		minView: 2,
		forceParse: 0
    });
    
